import axios from "./index";

export function fetchDatabaseListApi() {
    return axios.get('/database/databaseList');
}

export function fetchTableListByDbIdApi(dbId) {
    return axios.get('/database/tableList', {params:{id: dbId}});
}

export function fetchDbInfoApi(dbId) {
    return axios.get('/database/dbInfo', {params:{id: dbId}});
}

export function modifyDbInfoApi(dbInfo) {
    return axios.put('/database/dbInfo', dbInfo);
}

export function addDbInfoApi(dbInfo) {
    return axios.post('/database/dbInfo', dbInfo);
}

export function asyncDbToProFromDbBaseApi(dbId) {
    return axios.get('/database/asyncDbToProFromDbBase', {params:{id: dbId}});
}

export function fetchTableListByProjectHasDbApi(projectId) {
    return axios.get('/project/fetchTableListByProjectHasDb', {params:{projectId: projectId}});
}

